package com.ledi.guns.common.persistence.dao;

import java.util.List;
import java.util.Map;

import org.apache.ibatis.annotations.Param;

import com.baomidou.mybatisplus.mapper.BaseMapper;
import com.ledi.guns.common.persistence.model.Routes;
import com.ledi.guns.common.persistence.model.vo.RoutesVo;
import com.ledi.guns.core.node.ZTreeNode;

/**
 * <p>
 * 路由 Mapper 接口
 * </p>
 *
 * @author zhongxp
 * @since 2018-03-19
 */
public interface RoutesMapper extends BaseMapper<Routes> {

	List<ZTreeNode> routesTreeList();

	List<Map<String, Object>> selectRoutes(@Param("condition") String condition);

	/**
	 * 根据条件查询菜单
	 *
	 * @return
	 * @date 2017年2月12日 下午9:14:34
	 */
	List<Integer> getRoutesIdsByRoleId(@Param("roleId") Integer roleId);

	List<ZTreeNode> routesTreeListByRoutesIds(List<Integer> routesIds);

	List<RoutesVo> getRoutesByRoleId(@Param("roleId") Long roleId);
}
